<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{


   public function _initDbNames(){

      try {
          if ($this->hasPluginResource('db')){
             $db = $this->getPluginResource('db');
             $db->getDbAdapter()->query('SELECT 1');
            }
      } catch (Exception $e) {
         header('Content-type: text/html; charset=utf-8');
         echo $e->getMessage();
         exit(0);
      }
    }
   protected function _initConfig()
   {
       $config = new Zend_Config($this->getOptions(), TRUE);
       Zend_Registry::set('config', $config);
       return $config;
   }
   public function _initLayouts(){
      $view = new Zend_View();
      $view->setEncoding('UTF-8');

      Zend_Layout::startMvc(
          array(
             'layoutPath' => APPLICATION_PATH . '/modules/app/views/scripts',
             'layout' => 'layout',
             'pluginClass' => 'Layout'
          )
      );
      
      $view->doctype('XHTML1_STRICT');
      $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')
                        ->appendHttpEquiv('Content-Language', 'pl-PL')
                        ->appendName('descriptions', '')
                        ->appendName('keywords', '');
   
     
   }



   public function _initProtectMySession()
   {   
     
   }   
}
